<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .a{
            width: 100px;
            height: 100px;
            background-color: red;
            float: left;

        }
        .b{
            width: 200px;
            height: 200px;
            background-color: blue;
        }
        span{
            width: 100px;
            height: 100px;
            background-color: green;
            float: left;
            /* 行内元素浮动后会变成行内块元素。 */
        }
        /* 浮动元素会脱离文档流，不再占据文档流空间。 */
        /* 浮动元素彼此是从左往右排列，宽度超过一行会自动换行。 */

        .box1{
            width: 100px;
            height: 100px;
            background-color: orange;
        }
        .box2{
            width: 200px;
            /* height: 100px; */
            background-color: green;

        }
        .box2::after{
            clear: both;
            content: "";
            display: block;
        }
        /* 此处可以用来设置清除浮动效果。 */
        .box3{
            width: 100px;
            height: 100px;
            background-color: blueviolet;
        }
        .left{
            width: 50px;
            height: 50px;
            background-color: olive;
            float: left;

        }
        .right{
            width: 50px;
            height: 50px;
            background-color: lightcoral;
            float: left;
        }
    </style>
</head>
<body>
    <div class="a"></div>
    <span>小滴课堂</span>
    <div class="b"></div>
    <img src="https://file.xdclass.net/video/2025/dakezhutu/ZD2.gif?x-oss-process=image/resize,m_lfit,w_1920,h_1920/format,webp" alt="">
    Lorem, ipsum dolor sit amet consectetur adipisicing elit. Aliquid assumenda voluptatem enim vel illo labore neque dolore exercitationem asperiores repellat.
    <div class="box1"></div>
    <div class="box2">
        <div class="left">左边盒子</div>
        <div class="right">右边盒子</div>
    </div>
    <div class="box3"></div>
</body>
</html>